<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />

</head>
<body>


    <header class="aui-bar aui-bar-nav" id="aui-header" style="background:#2979ff;">
        <a class="aui-btn aui-pull-left" tapmode onclick="closeWd()">
            <span class="aui-iconfont aui-icon-close" style="color:#FFF"></span>
        </a>

      <div id="title" class="aui-title"> <img src="" style="width: 20px;display: inline;margin-right: 10px;">

	  管理中心</div>
		
		

		        <a class="aui-btn aui-pull-right" tapmode onclick="toShezhi()">
            <span class="aui-iconfont aui-icon-gear" style="color:#FFF"></span>
        </a>
		
    </header> 






</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript">
   
    var api_url = localStorage.getItem('api_url');

    apiready = function(){

      api.parseTapmode();
	  
      var header = $api.byId('aui-header');
      $api.fixStatusBar(header);
      var headerPos = $api.offset(header);
      var body_h = $api.offset($api.dom('body')).h;

	 if(api.systemType == 'ios') {


      var browser = api.require('webBrowser');
      browser.openView({
          url: api.pageParam.url,
		  progress:{
         color: '#2979ff'
       },
              rect: {
                  x: 0,
                  y: headerPos.h,
                  w: 'auto',
                  h: 'auto'
              }
      }, function(ret, err) {
          switch (ret.state) {
              case 0:

                  break;
				  
              case 1:
	  			  
                  break;
              case 2:
			  
				api.hideProgress();  
	
                  break;
              case 3:
				break;
              case 4:
                  break;
              default:
                  break; 
          }
      });



 }else{   //如果不是IOS
 
 

  api.parseTapmode();


          api.openFrame({

              name: 'video_frame',
              url: api.pageParam.url,
		  progress:{
         color: '#2979ff'
       },

              rect: {
                  x: 0,
                  y: headerPos.h,
                  w: 'auto',
                  h: 'auto'
              }
          });
		  
 
 

 
 }	



		  


};

//初始化结束


 

    function closeWd(){
      api.closeWin();
    }

    
	
	
	
      function toShezhi(){


        api.openWin({
            name: 'shezhi_win',
            url: 'shezhi_win.html', 
        });
		
		
		//打开页面时 关闭当前页
		api.addEventListener({
         name:'viewdisappear'
     },function(){
         api.closeWin({
              name:api.winName
         });
     });
	 

    }

  </script>  
  </html>
 